package com.jiantong.work.impl.dao;

import com.jiantong.work.model.BreedTransferRecord;
import io.terminus.common.mysql.dao.MyBatisDao;
import org.springframework.stereotype.Repository;

/**
 * Created by mz on 11/8/17.
 *
 */
@Repository
public class BreedTransferRecordDao extends MyBatisDao<BreedTransferRecord>{

    /**
     * 查询当前最大的单据编号
     * @param number 单据编号
     * @return String
     */
    public String findCurrentMaxNumber(String number){
        return getSqlSession().selectOne(sqlId("findCurrentMaxNumber"),number);
    }

    /**
     * 根据ID的查询单据的当前壮体啊
     * @param id 单据ID
     * @return status 当前的状态
     */
    public Integer findStatusById(Long id) {
        return getSqlSession().selectOne(sqlId("findStatusById"), id);
    }
}
